import { Form, Table } from 'antd';
import Cls from 'classnames';
import { useContext, useEffect, useMemo, useState } from 'react';
import { connect } from 'umi';
import { getTableColumns } from '../mconfig/NodesTablecolumn';

const Processnodes: React.FC<any> = ({ curRes }) => {
  const getTableColumn: Record<string, any>[] = useMemo(() => {
    return getTableColumns();
  }, [curRes]);

  const data = [
    {
      id: '1',
      applyInfo: '发起人修改',
      applyState: '超级管理员',
      workflowID: '超级管理员',
      applyStartTime: '否',
    },
    {
      id: '2',
      applyInfo: '部门领导审批',
      applyState: '人事党群部',
      workflowID: '资产审批',
      applyStartTime: '否',
    },
    {
      id: '3',
      applyInfo: '单位领导审批',
      applyState: '资产审批',
      workflowID: '仓管员',
      applyStartTime: '否',
    },
  ];

  return (
    <>
      <Table columns={getTableColumn} bordered size="small" dataSource={data} rowKey={(res) => res?.id} scroll={{ x: 1200, y: '' }} pagination={false} />
    </>
  );
};

export default connect(({ baseLogin, navTab }: Record<string, any>) => ({
  curRes: baseLogin?.permissions,
  navTab,
}))(Processnodes);
